<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button onclick="getData()">获取数据</button>
  <ul id="ul"></ul>

  <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
  <script>
    let ul = document.getElementById('ul')
    function getData() {
      $.ajax({
        url: 'https://mock.mengxuegu.com/mock/65a91543c4cd67421b34c898/movie/movieList',
        method: 'GET',
        data: {
          name: 'pingping',
          age: 18
        },
        success: function(res) {
          console.log(res)
          for (let i = 0; i < res.movieList.length; i++){
            const li = document.createElement('li')
            li.innerText = `${res.movieList[i].nm} -- ${res.movieList[i].star}`
            ul.appendChild(li)
          }
        }
      })
      
    }
  </script>
</body>
</html>